home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 16 / 016.d81 / pps #38 < prev    next >
Text File  |  2022-08-26  |  2KB  |  134 lines

  1. ======================================
  2.    PEEKs, POKEs, & SYSes -- Part 38
  3.  
  4.      by James Gregory Wheeler and
  5.           Alien the Garden
  6.  
  7. ======================================
  8.  
  9.   Last month we gave you routines to
  10.  
  11. draw hi-resolution vertical and
  12.  
  13. horizontal lines.  By now you've
  14.  
  15. probably guessed that we did that
  16.  
  17. because we couldn't figure out how to
  18.  
  19. do diagonal lines.
  20.  
  21.   This month we figured out how to do
  22.  
  23. diagonals so we thought we'd share
  24.  
  25. that new gem with you.
  26.  
  27.   The machine code routines this time
  28.  
  29. are called SYSPLOTTERC.  Here's how
  30.  
  31. they differ from last month's
  32.  
  33. SYSPLOTTERB routines.
  34.  
  35.   1. HRIZLINE and VERTLINE have been
  36.      deimplemented (that's high-tech
  37.      for "taken out").
  38.  
  39.   2. LINE and XLINE have been put in
  40.      their place.
  41.  
  42.   LINE and XLINE use four parameters
  43.  
  44. each, a horizontal and a vertical
  45.  
  46. coordinate for each end of the line,
  47.  
  48. like so:
  49.  
  50.   SYS LINE,H1,V1,H2,V2
  51.  
  52.                 H1,V1
  53.                   /
  54.                  /
  55.                 /
  56.                /
  57.               /
  58.            H2,V2
  59.  
  60.  
  61.   LINE draws a solid line from the
  62.  
  63. first pair of horizontal coordinates
  64.  
  65. to the second pair.
  66.  
  67.   XLINE erases a solid line from the
  68.  
  69. first pair to the second.
  70.  
  71. --------------------------------------
  72.  
  73.   Here, then, are the SYSes and
  74.  
  75. maximum parameter values for the
  76.  
  77. SYSPLOTTERC routines.  You will
  78.  
  79. recognize most of them from the
  80.  
  81. previous installments of PEEKs,
  82.  
  83. POKEs, and SYSes.
  84.  
  85. SETGRAPHIC: turn on hi-res
  86.   SYS 49152
  87.  
  88. UNGRAPHIC: return to text screen
  89.   SYS 49155
  90.  
  91. CLEARGRAPHIC: erase hi-res screen
  92.   SYS 49158
  93.  
  94. COLORSMEAR: set hi-res background
  95.   SYS 49161, <15>
  96.  
  97. PLOTCOLOR: set hi-res "pen" color
  98.   SYS 49164, <15>
  99.  
  100. DRAW: turn on a single hi-res point
  101.   SYS 49167, <319>, <199>
  102.  
  103. ERASE: turn off a hi-res point
  104.   SYS 49170, <319>, <199>
  105.  
  106. LINE: draw a hi-res line
  107.   SYS 49173,<319>,<199>,<319>,<199>
  108.  
  109. XLINE: erase a hi-res line
  110.   SYS 49176,<319>,<199>,<319>,<199>
  111.  
  112.      -------------------------
  113.  
  114.   Special thanks to Ed Loewenstein
  115.  
  116. for coming up with the line algorithm.
  117.  
  118. ======================================
  119.  
  120.   Our demo program this month is
  121.  
  122. called PLOTTERC DEMO.  It has two fun
  123.  
  124. and one serious application for
  125.  
  126. diagonal lines.  If you want to look
  127.  
  128. at it, say so now by pressing the '\'
  129. \oad"plotterc demo",8
  130. (English pound) key now.
  131.  
  132. -----------<end of article>----------
  133.  
  134.